<?php
try{
   
    session_start();
	date_default_timezone_set("Asia/Ho_Chi_Minh");
    include '../../config.php';
    
    $dbh=new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME,DB_USER,DB_PASS);
    $dbh->exec('set names utf8');
	include '../../libraries/smarty/Smarty.class.php';
	$dt_smarty=new Smarty;
    include '../../libraries/function.php';
	$dt_smarty->setCacheDir('../../cache/');
    $dt_smarty->setConfigDir('../../configs/');
    $dt_smarty->setTemplateDir('../templates/');
    $dt_smarty->setCompileDir('../templates_c/');
	$dt_smarty->display('board/login.tpl');

    $dbh=NULL;
	
} catch(Exception $e){
	$_SESSION['msg']=$e->getMessage();
    $_SESSION['type_msg']='error';
    header('Location: login.php');
	$dbh=NULL;
}